home *** CD-ROM | disk | FTP | other *** search
-
- Program: etime
- Programmer: George Kerber
- Written: 07/16/89 - 08/05/89
- Version: 1.03
- Application: AmigaDOS
- Purpose: This utility will provide an elapsed time display.
- The elapsed time will be displayed as hh:mm:ss or seconds.
-
- SYNTAX: etime [[? -r -s -n -d -# ] [path]TIMERNAME ]
-
- ? same as no option, a help screen will be displayed.
- -r etime file will be retained.
- -s The elapsed time will be returned in seconds.
- -n A newline after output.
- -d unconditionally delete etime file and reset.
- -1 white
- -2 black
- -3 orange
- -5 bold face
- -6 underline
- -7 italics
- path default is ram:etime.
-
- Installation: Simply copy etime to your c: directory. Or execute
- the install script called etime.install.
-
- execute etime.install
-
- The etime.install script provides an example of the one of
- the possible uses for etime. Even if you don't use the
- etime.install script, take a look at it anyway.
-
- Directions: Execute etime with a timername to start the timer.
- Execute etime again with the same timername and the elapsed
- time will be displayed as hh:mm:ss. If the -s option is
- used the elapsed time will be displayed in total seconds
- only. Normally the etime file is deleted, the -r option
- will retain the file for later use. Any number of timers
- can be in use at any time. The -n option will
- prevent a newline after the elapsed time is displayed.
- This option works the same as the NOLINE option for the
- AmigaDOS echo command
-
- Considerations: If only a timername is supplied, etime will attempt to write
- the etime file in ram:etime (the directory will be created
- if necessary). If a full path name is supplied for the
- etime file, it will be used instead of the default. Since
- the etime default directory is in ram:, etime files will
- not survive a reboot. If you want an etime file to survive
- a reboot, you will have to specify a full path name for the
- etime file on a disk instead of ram:.
-
- Examples: So what good is it?
-
- Try executing your programs using batch files, and start an
- etime timer as one of the first commands in the batch file.
-
- ....
- etime -d startprogram ;start timer named startprogram.
- .... ;-d to insure no other etimers have
- .... ;this name
- execute your program.....
- ....
- echo "*n*n Program Duration: " NOLINE
- etime startprogram ;end timer and display the elapsed time
- ....
-
- Now whenever you quit your program, the elapsed time will
- be displayed for the time you were using the program.
-
- -----------------------------------------------------------
-
- Use the -s option and the IF command to have certain
- commands performed only if enough time has passed.
-
- ....
- etime -d timername1 ; start timer named timername1
- ....
- ....
- do stuff here
- ....
- etime > env:seconds -s timername1 ;end timer and place
- ;the elapsed seconds into
- ;an environmental variable
- ;called seconds
- if $seconds gt 60 VAL ;compare elapsed seconds to 60
- echo "More than 60 seconds elapsed between start and finish"
- else
- echo "Less than 60 seconds elapsed between start and finish"
- endif
-
- Get the idea.....
-
-
- Status: This is public domain, but please keep me as author and
- keep all the documentation intact. Anyway, if something
- is wrong with this program, I'm not responsible.....
-
-
- History: v1.02: initial release.
- v1.03: learned about getting options and added a bunch.
- etime no longer uses ENV:, it creates it's own
- directory in ram: or allows the user to specify
- an alternative.
-